﻿using DataCenter_DataBase;
using KeaoBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Web;

namespace DataCenter.Models.WeiXin
{
    public class WeiXinEvent_subscribe : BaseWeiXinEvent
    {
        public WeiXinEvent_subscribe(KeaoBase.KeaoXmlHelper XmlHelper) : base(XmlHelper)
        {
            
        }

        public override string ResponseResult()
        {
            ThreadPool.QueueUserWorkItem(new WaitCallback(WeiXinComm.CreateWeiXinUser),this);
            return ReturnTextMsg("尊敬客户您好，欢迎关注科奥电子公众号。\n专业专注 全心服务");
        }



        //WeiXinUtils.WeiXinTemplateMsg templateMsg = new WeiXinUtils.WeiXinTemplateMsg(SysConfig._Config.appid, SysConfig._Config.secret);
        //templateMsg.touser = this.FromUserName;
        //    templateMsg.url = "";
        //    templateMsg.template_id = "5BR3cKxTaMBKarlBbrv_Mo_auUXSzUOru3QcuF0N7Vc";
        //    templateMsg.AddContext("first", "尊敬的客户您好，您的微信账号已通过审核。","#000000");
        //    templateMsg.AddContext("keyword1", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "#000000");
        //    templateMsg.AddContext("keyword2", "审核成功", "#000000");
        //    templateMsg.AddContext("remark", "感谢使用，如有任何问题，请与0371-61171121联系。", "#000000");
        //    templateMsg.SendMsg();
    }
}